package net.oschina.app.Page;

import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

import com.robotium.solo.By;
import com.robotium.solo.WebElement;

import net.oschina.app.SoloWrap;

/**
 * Created by kola on 2017/4/4.
 */

public class PageNewDetails {
    private SoloWrap solo;

    public PageNewDetails(SoloWrap solo) {
        this.solo = solo;
    }

//    public void initViews() {
//       solo.sleep(8);
//       FrameLayout frameLayout= (FrameLayout) solo.getView("net.oschina.app:id/lay_webview");
//       frameLayout.getChildAt(0);

//    }

    public String getContent() {
        solo.waitForText("资讯详情");
        WebElement webElement = solo.getWebElements(By.xpath("/html/body/div/p[3]")).get(0);
//        webElement.getText();
        return webElement.getText().toString();

    }
}